[NET] back: Remove unused rx_mmap area. Copying happens inside Xen, so
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Thu, 5 Oct 2006 21:14:39 +0000 (22:14 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Thu, 5 Oct 2006 21:14:39 +0000 (22:14 +0100)
there is no need for a mapping area inside the driver for copying
receive path.
Signed-off-by: Keir Fraser <keir@xensource.com>
linux-2.6-xen-sparse/drivers/xen/netback/netback.c

index 2da471c195ec898980d50aa7c68affbe5400b595..3d70c5dd38475bd116e408f64bfe5b206982f752 100644 (file)
@@ -73,8 +73,6 @@ static struct sk_buff_head rx_queue;
 static unsigned long mmap_vstart;
 #define MMAP_VADDR(_req) (mmap_vstart + ((_req) * PAGE_SIZE))
 
-static void *rx_mmap_area;
-
 #define PKT_PROT_LEN 64
 
 static struct {
@@ -1323,12 +1321,6 @@ static void netif_page_release(struct page *page)
        netif_idx_release(pending_idx);
 }
 
-static void netif_rx_page_release(struct page *page)
-{
-       /* Ready for next use. */
-       set_page_count(page, 1);
-}
-
 irqreturn_t netif_be_int(int irq, void *dev_id, struct pt_regs *regs)
 {
        netif_t *netif = dev_id;
@@ -1459,16 +1451,6 @@ static int __init netback_init(void)
                SetPageForeign(page, netif_page_release);
        }
 
-       page = balloon_alloc_empty_page_range(NET_RX_RING_SIZE);
-       BUG_ON(page == NULL);
-       rx_mmap_area = pfn_to_kaddr(page_to_pfn(page));
-
-       for (i = 0; i < NET_RX_RING_SIZE; i++) {
-               page = virt_to_page(rx_mmap_area + (i * PAGE_SIZE));
-               set_page_count(page, 1);
-               SetPageForeign(page, netif_rx_page_release);
-       }
-
        pending_cons = 0;
        pending_prod = MAX_PENDING_REQS;
        for (i = 0; i < MAX_PENDING_REQS; i++)